.class public Lcom/philzhu/www/framework/impl/AndroidInput;
.super Ljava/lang/Object;
.source "AndroidInput.java"

# interfaces
.implements Lcom/philzhu/www/framework/Input;


# instance fields
.field accelHandler:Lcom/philzhu/www/framework/impl/AccelerometerHandler;

.field keyHandler:Lcom/philzhu/www/framework/impl/KeyboardHandler;

.field touchHandler:Lcom/philzhu/www/framework/impl/TouchHandler;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/view/View;FF)V
    .locals 1
    .parameter "context"
    .parameter "view"
    .parameter "scaleX"
    .parameter "scaleY"

    .prologue
    .line 18
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 19
    new-instance v0, Lcom/philzhu/www/framework/impl/AccelerometerHandler;

    invoke-direct {v0, p1}, Lcom/philzhu/www/framework/impl/AccelerometerHandler;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->accelHandler:Lcom/philzhu/www/framework/impl/AccelerometerHandler;

    .line 20
    new-instance v0, Lcom/philzhu/www/framework/impl/KeyboardHandler;

    invoke-direct {v0, p2}, Lcom/philzhu/www/framework/impl/KeyboardHandler;-><init>(Landroid/view/View;)V

    iput-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->keyHandler:Lcom/philzhu/www/framework/impl/KeyboardHandler;

    .line 22
    new-instance v0, Lcom/philzhu/www/framework/impl/SingleTouchHandler;

    invoke-direct {v0, p2, p3, p4}, Lcom/philzhu/www/framework/impl/SingleTouchHandler;-><init>(Landroid/view/View;FF)V

    iput-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->touchHandler:Lcom/philzhu/www/framework/impl/TouchHandler;

    .line 25
    return-void
.end method


# virtual methods
.method public getAccelX()F
    .locals 1

    .prologue
    .line 49
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->accelHandler:Lcom/philzhu/www/framework/impl/AccelerometerHandler;

    invoke-virtual {v0}, Lcom/philzhu/www/framework/impl/AccelerometerHandler;->getAccelX()F

    move-result v0

    return v0
.end method

.method public getAccelY()F
    .locals 1

    .prologue
    .line 54
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->accelHandler:Lcom/philzhu/www/framework/impl/AccelerometerHandler;

    invoke-virtual {v0}, Lcom/philzhu/www/framework/impl/AccelerometerHandler;->getAccelY()F

    move-result v0

    return v0
.end method

.method public getAccelZ()F
    .locals 1

    .prologue
    .line 59
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->accelHandler:Lcom/philzhu/www/framework/impl/AccelerometerHandler;

    invoke-virtual {v0}, Lcom/philzhu/www/framework/impl/AccelerometerHandler;->getAccelZ()F

    move-result v0

    return v0
.end method

.method public getKeyEvents()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lcom/philzhu/www/framework/Input$KeyEvent;",
            ">;"
        }
    .end annotation

    .prologue
    .line 69
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->keyHandler:Lcom/philzhu/www/framework/impl/KeyboardHandler;

    invoke-virtual {v0}, Lcom/philzhu/www/framework/impl/KeyboardHandler;->getKeyEvents()Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method public getTouchEvents()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lcom/philzhu/www/framework/Input$TouchEvent;",
            ">;"
        }
    .end annotation

    .prologue
    .line 64
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->touchHandler:Lcom/philzhu/www/framework/impl/TouchHandler;

    invoke-interface {v0}, Lcom/philzhu/www/framework/impl/TouchHandler;->getTouchEvents()Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method public getTouchX(I)I
    .locals 1
    .parameter "pointer"

    .prologue
    .line 39
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->touchHandler:Lcom/philzhu/www/framework/impl/TouchHandler;

    invoke-interface {v0, p1}, Lcom/philzhu/www/framework/impl/TouchHandler;->getTouchX(I)I

    move-result v0

    return v0
.end method

.method public getTouchY(I)I
    .locals 1
    .parameter "pointer"

    .prologue
    .line 44
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->touchHandler:Lcom/philzhu/www/framework/impl/TouchHandler;

    invoke-interface {v0, p1}, Lcom/philzhu/www/framework/impl/TouchHandler;->getTouchY(I)I

    move-result v0

    return v0
.end method

.method public isKeyPressed(I)Z
    .locals 1
    .parameter "keyCode"

    .prologue
    .line 29
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->keyHandler:Lcom/philzhu/www/framework/impl/KeyboardHandler;

    invoke-virtual {v0, p1}, Lcom/philzhu/www/framework/impl/KeyboardHandler;->isKeyPressed(I)Z

    move-result v0

    return v0
.end method

.method public isTouchDown(I)Z
    .locals 1
    .parameter "pointer"

    .prologue
    .line 34
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidInput;->touchHandler:Lcom/philzhu/www/framework/impl/TouchHandler;

    invoke-interface {v0, p1}, Lcom/philzhu/www/framework/impl/TouchHandler;->isTouchDown(I)Z

    move-result v0

    return v0
.end method
